;(function(){


    class DumpHtml{
        constructor(){
            // 首页购物车跳转
            this.cartBtn = $("#indexCartBtn");
            // 首页商品列表跳转
            this.indexListBox = $("#indexListBox");
            // 商品列表页跳转
            // this.listGoodsBox = $(".recommend_goods_box");
            // 详情页购物车跳转
            this.detailsCartBtn = $("#detailsCartBtn");
            // 购物车log添砖至首页
            this.cartSeachLogo = $("#cartSeachLogo");

        }
        addEvent(){
            // 首页购物车跳转
            this.cartBtn.on("click",()=>{
                
                window.location.href = "http://localhost/XMYP/src/pages/cart.html";
            });
             // 首页商品列表跳转
            this.indexListBox.on("click",$("#indexListBox li a"),()=>{
                window.location.href="http://localhost/XMYP/src/pages/list.html"
            });
            // 商品列表页跳转

             // 详情页购物车跳转
            this.detailsCartBtn.on("click",()=>{
                window.location.href = "http://localhost/XMYP/src/pages/cart.html";
            });
            // 购物车log添砖至首页
            this.cartSeachLogo.on("click",()=>{
                window.location.href = "http://localhost/XMYP/src/index.html";
            });
        }
    }

    let dumpHtml = new DumpHtml();
    dumpHtml.addEvent();


}());